package com.first.module.acm.service.impl;

import java.util.List;
import java.util.Set;

import com.first.core.service.impl.BaseServiceImpl;
import com.first.core.util.PagingBean;
import com.first.module.acm.dao.AppUserDao;
import com.first.module.acm.model.AppUser;
import com.first.module.acm.service.AppUserService;

public class AppUserServiceImpl extends BaseServiceImpl<AppUser> implements
		AppUserService {
	private AppUserDao dao;

	public AppUserServiceImpl(AppUserDao dao) {
		super(dao);
		this.dao = dao;
	}

	public AppUser findByUserName(String username) {
		return this.dao.findByUserName(username);
	}
	
	/*
	 * (non-Javadoc)
	 * @see com.htsoft.admin.service.AppUserService#findByCodeNum(java.lang.String)
	 */
	public AppUser findByCodeNum(String codeNum){
		return this.dao.findByCodeNum(codeNum);
	}

	public List findByDepartment(String path, PagingBean pb) {
		return this.dao.findByDepartment(path, pb);
	}

	public List findByRole(Long roleId, PagingBean pb) {
		return this.dao.findByRole(roleId, pb);
	}

	public List findByRoleId(Long roleId) {
		return this.dao.findByRole(roleId);
	}

	public List<AppUser> findSubAppUser(String path, Set<Long> userIds,
			PagingBean pb) {
		return this.dao.findSubAppUser(path, userIds, pb);
	}

	public List<AppUser> findSubAppUserByRole(Long roleId, Set<Long> userIds,
			PagingBean pb) {
		return this.dao.findSubAppUserByRole(roleId, userIds, pb);
	}

	public List<AppUser> findByDepId(Long depId) {
		return this.dao.findByDepId(depId);
	}
}
